﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;
using Model;
namespace BLL
{
   public class SOP_CustomerBLL
    {
        #region 私有变量
        private static SOP_CustomerDAL _dal;
        private static SOP_CustomerDAL dal
        {
            get
            {
                if (_dal == null)
                {
                    _dal = new SOP_CustomerDAL();
                }
                return _dal;
            }
        }
        #endregion

       /// <summary>
       /// BA推荐注册
       /// </summary>
        /// <param name="AssemblyPath">数据层命名空间</param>
       /// <param name="model"></param>
       /// <param name="UserID"></param>
       /// <returns></returns>
        public static int Add_Web(Model.SOP_Customer model, String Remark, String IPAddress, out int UserID, out bool IsSync)
        {
            return dal.AddCustomer_Web(model, Remark, IPAddress, out UserID, out IsSync);
        }

        /// <summary>
        /// 获取个人信息
        /// </summary>
        /// <param name="CustomerID"></param>
        /// <returns></returns>
        public static API_CustomerInfoObj GetCustomerInfoByCustomerID(int CustomerID)
        {
            return dal.GetCustomerInfoByCustomerID(CustomerID);
        }

        /// <summary>
        /// 更新用户地址
        /// </summary>
        /// <param name="model"></param>
        /// <param name="error"></param>
        /// <returns></returns>
        public static int UpdateAddressByCustomerID(SOP_Customer model, out String error)
        {
            return dal.UpdateAddressByCustomerID(model, out error);
        }
    }
}
